package com.yshkj.payment.dto;

import com.yshkj.payment.entity.medicinal.Medicinal;
import lombok.Data;

import java.util.List;
import java.util.Map;

/**
 * 药品列表DTO
 * Created by 唐旭 on 2016/10/2.
 */
@Data
public class MedicinalListDto extends PageListJsonDto<MedicinalDto> {
    //药品名称
    private String searchKey;

    @Override
    public void addAllList(List resultItem) {
        for (Object item : resultItem) {
            super.list.add(new MedicinalDto((Medicinal) item));
        }
    }

    @Override
    public Map<String, Object> getQuery() {
        query.put("searchKey", searchKey);
        return query;
    }
}
